package com.xiaobo.framework.service;

import com.xiaobo.framework.bean.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import static com.xiaobo.framework.bean.MqInfo.slaveOneQueue;

/**
 * @author: <a href="get_xiaobo@163.com">Josh_Xu</a>
 * @description:
 * @create: 2020-05-18 16:27
 **/
@Component
@RabbitListener(queues = slaveOneQueue)
public class ReceiveMessage {

    @RabbitHandler
    public void process(Message message){
        System.out.println(message);
    }

    @RabbitHandler
    public void processs(String message){
        System.out.println(message);
    }
}
